<template>


</template>

<script setup>
import {io} from 'socket.io-client';
const socket = io(host, {transports: ['websocket']});
socket.on('connect', () => {
    console.log('Connected to server');
});

import {onBeforeRouteLeave} from 'vue-router';
onBeforeRouteLeave(() => {
    socket.disconnect();
    console.log('Disconnected from server');
});

</script>